package linearstructure.linkedlist.doublelist;

/**
 * @ author : HyoJoo-W
 * @ createDate : 2021-05-25 19:42
 * @ Description :
 */
public class Test
{
    public static void main(String[] args)
    {
        Node node = new Node(1, "宋江", "及时雨");
        Node node1 = new Node(2, "宋江2", "及时雨2");
        Node node2 = new Node(3, "宋江3", "及时雨3");
        Node node3 = new Node(4, "宋江4", "及时雨4");

        DoubleLinkedList doubleLinkedList = new DoubleLinkedList();
        doubleLinkedList.add(node);
        doubleLinkedList.add(node2);
        doubleLinkedList.add(node3);
        doubleLinkedList.add(node1);

        doubleLinkedList.list();

        Node newNode = new Node(4, "公孙胜", "入云龙");
        doubleLinkedList.update(newNode);
        System.out.println("修改后...");
        doubleLinkedList.list();

        doubleLinkedList.delete(3);
        System.out.println("删除后");
        doubleLinkedList.list();
    }

}
